package org.despair2D.ui.supportClasses 
{
	import flash.events.Event;
	import org.despair2D.debug.Logger;
	import org.despair2D.model.RangeProperty;
	import org.despair2D.ui.FusionGroup;
	
	import org.despair2D.core.ns_despair
	use namespace ns_despair;
	
	
	[Event(name = "change", type = "flash.events.Event")] 
	
public class AbstractRange extends FusionGroup 
{
	
	public function AbstractRange( v:Number = 0, min:Number = 0, max:Number = 100 )
	{
		m_range = new RangeProperty(v, min, max)
	}
	
	
	
	public function get ratio() : Number { return m_range.ratio }
	public function set ratio( v:Number ) :void
	{
		m_range.ratio = v
	}
	
	
	public function get value() : Number { return m_range.value }
	public function set value( v:Number ) : void
	{
		m_range.value = v
	}
	
	
	public function get minimum():Number { return m_range.minimum }
	public function set minimum( v:Number ) : void
	{
		m_range.minimum = v
	}
	
	
	public function get maximum():Number { return m_range.maximum }
	public function set maximum( v:Number ) : void
	{
		m_range.maximum = v
	}
	
	
	public function get snapInterval():Number { return m_range.snapInterval }
	public function set snapInterval( v:Number ) : void
	{
		m_range.snapInterval = v
	}
	
	
	
	ns_despair function ____onRangeChange() : void
	{
		this.dispatchEvent(new Event(Event.CHANGE))
	}
	
	
	override ns_despair function recycle() : void
	{
		super.recycle()
		m_range.dispose()
		m_range = null
	}
	
	
	
	protected var m_range:RangeProperty;
	
}

}